package com.demo.service.impl;

import com.demo.bean.Emp;
import com.demo.dao.EmpDao;
import com.demo.service.EmpService;

import java.util.List;

/**
 * @author : mafan
 * @date : 2021-02-03 14:34
 **/


public class EmpServiceImpl implements EmpService {

    private EmpDao empDao;

    public EmpDao getEmpDao() {
        return empDao;
    }

    public void setEmpDao(EmpDao empDao) {
        this.empDao = empDao;
    }

    @Override
    public List<Emp> findEmp(String ename) {
        System.out.println("******************service*****");
        return empDao.findEmp(ename);

    }

    @Override
    public boolean saveEmp(Emp emp) {
        return empDao.saveEmp(emp);
    }

    @Override
    public List<Emp> findAll(Emp emp) {
        return empDao.findAll(emp);
    }

    @Override
    public Integer deleteEmp(Integer empno) {
        return empDao.deleteEmp(empno);
    }

    @Override
    public boolean updateEmp(Emp emp) {
        return empDao.updateEmp(emp);
    }
}
